package com.youdianda.controller;


import com.youdianda.dto.SysconfigDTO;
import com.youdianda.result.Result;
import com.youdianda.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sdy
 * @since 2023-05-15
 */
@RestController
@RequestMapping("/sys_config")
public class SysConfigController {
    @Autowired
    private ISysConfigService iSysConfigService;

    /**
     * 所有配置查询
     * @return
     */
    @GetMapping("/all")
    public Result all(){return iSysConfigService.all();}


    /**
     * 修改系统配置
     * @return
     */
    @PostMapping("/update")
    public Result updatenew(@RequestBody List<SysconfigDTO> dtoList){return iSysConfigService.updatenew(dtoList);}
}

